package com.example.coding_problem.Fragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import org.jetbrains.annotations.Nullable;

import java.util.List;

class ViewPagerAdapter1 extends FragmentPagerAdapter {
    private List<Fragment> life_fragmentList;
    private String[] stringsTools1;
    public ViewPagerAdapter1(FragmentManager fm, List<Fragment> fragmentList, String[] stringsTools) {
        super(fm);
        this.life_fragmentList=fragmentList;
        this.stringsTools1=stringsTools;
    }

    public ViewPagerAdapter1(FragmentManager childFragmentManager) {
        super(childFragmentManager);
    }

    @Override
    public Fragment getItem(int i) {
        return life_fragmentList.get(i);
    }

    @Override
    public int getCount() {
        return life_fragmentList.size();
    }
    @Nullable
    @Override
    public CharSequence getPageTitle(int position){
        return stringsTools1[position];
    }
}
